package leetcode.code045;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution045 implements IDebug {

	public abstract int jump(int[] nums);

	private void debug(String str1, int expect) {
		int[] nums = HelpDebug.str2array3(str1);
		int result = jump(nums);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug1() {
		// 输入: nums = [2,3,1,1,4]
		// 输出: 2
		String str1 = "[2,3,1,1,4]";
		int expect = 2;
		this.debug(str1, expect);
	}

	@Override
	public void debug2() {
		// 输入: nums = [2,3,0,1,4]
		// 输出: 2
		String str1 = "[2,3,0,1,4]";
		int expect = 2;
		this.debug(str1, expect);
	}

	@Override
	public void debug3() {

	}

	@Override
	public void debug4() {

	}

}
